<template>
  <div class="view">
    <div class="li_top">
      <span>{{ item.ARName ? item.ARName : "" }}</span>
      <p>更新: {{ transitionTime(item.UpdateTime) }}</p>
    </div>
    <div class="li_name">{{ item.GWName }}</div>
    <div class="li_line"></div>
    <div class="li_num">产品数量: {{ item.ProductCnt }}</div>
    <div class="li_btm">
      <p>断电翻卡: {{ item.FanKaAlarm == 0 ? "未告警" : "告警" }}</p>
      <p>告警: {{ item.AutoCheckAlarmCnt ? item.AutoCheckAlarmCnt : 0 }}</p>
    </div>
  </div>
</template>

<script setup>
const porps = defineProps(["item"]);
import { transitionTime } from "@/utils/time.js";
</script>

<style lang="scss" scoped>
.view {
  width: 100%;
  height: 100%;
  container-type: size !important;
  display: flex;
  flex-direction: column;
  .li_top,
  .li_btm {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .li_top {
    width: 100%;
    flex: 3.05;
    justify-content: flex-end;
    background-image: url("@/static/supervisoryControl/pic_bj07-1.png");
    background-size: 100% 100%;
    & > span {
      font-family: PingFangSC, PingFang SC;
      font-weight: 500;
      font-size: calc((4.6cqh) + (2.3cqw));
      color: #fc721f;
    }
    & > p {
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: calc((3cqh) + (1.5cqw));
      color: #fcfcfc;
      margin-top: 2%;
      margin-bottom: 2%;
    }
  }
  .li_line {
    height: 1px;
    background: linear-gradient(to right, #17383f, #00c6fb, #17383f);
  }
  .li_btm {
    width: 100%;
    justify-content: flex-start;
    flex: 2.1;
    background-image: url("@/static/supervisoryControl/pic_bj07-2.png");
    background-size: 100% 100%;
    & > p {
      font-family: PingFangSC, PingFang SC;
      font-weight: 500;
      font-size: calc((3cqh) + (1.5cqw));
      margin-top: 2px;
      color: #00fbee;
    }
  }
  .li_name {
    margin: 2px 0;
    font-family: PingFangSC, PingFang SC;
    font-weight: 600;
    font-size: calc((5.4cqh) + (2.7cqw));
    color: #00b6fd;
    text-align: center;
  }
  .li_num {
    font-family: PingFangSC, PingFang SC;
    font-weight: 500;
    font-size: calc((3.6cqh) + (1.8cqw));
    color: #d6ff72;
    text-align: center;
    margin: 1px 0 0;
  }
}
</style>